<?php
/**
 * Talents come from diligence, and knowledge is gained by accumulation.
 *
 * @author: 晋<657306123@qq.com>
 * @date: 2019/11/17 22:26
 */

namespace app\common\contract;

use app\common\model\App as AppModel;

/**
 * Interface AppInterface
 *
 * @package app\common\interfaces
 */
interface AppInterface{

	/**
	 * 获取应用信息
	 *
	 * @param string $field
	 * @param mixed  $default
	 * @param bool   $abort
	 * @return AppModel|mixed
	 */
	public function get($field = null, $default = null, $abort = true);

	/**
	 * 获取应用id
	 *
	 * @param bool $abort
	 * @return int
	 */
	public function getId($abort = true);

	/**
	 * 设置应用信息
	 *
	 * @param array|AppModel $info
	 * @return bool
	 */
	public function set($info);
}
